<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>菜单界面示例</title>
    <style>
        body {
            display: flex;
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
        }
        .sidebar {
            width: 200px;
            background-color: #2c3e50;
            color: white;
            height: 100vh;
            padding: 20px;
            box-sizing: border-box;
        }
        .sidebar a {
            display: block;
            color: white;
            padding: 10px 0;
            text-decoration: none;
            cursor: pointer;
        }
        .sidebar a:hover {
            background-color: #34495e;
        }
        .main-content {
            flex-grow: 1;
            padding: 20px;
            box-sizing: border-box;
        }
        .content-section {
            display: none;
        }
    </style>
</head>
<body>
    <div class="sidebar">
        <h2>菜单</h2>
        <a onclick="showContent('personal-info')">个人信息</a>
        <a onclick="showContent('dish-selection')">菜品选择</a>
        <a onclick="showContent('shopping-cart')">购物车</a>
        <a onclick="showContent('orders')">订单</a>
        <a onclick="showContent('settings')">设置</a>
    </div>
    <div class="main-content">
        <div id="personal-info" class="content-section">
            <h1>个人信息</h1>
            <p>这里是用户的个人信息。</p>
        </div>
        <div id="dish-selection" class="content-section">
            <h1>菜品选择</h1>
            <p>这里是菜品选择的内容。</p>
        </div>
        <div id="shopping-cart" class="content-section">
            <h1>购物车</h1>
            <p>这里是购物车的内容。</p>
        </div>
        <div id="orders" class="content-section">
            <h1>订单</h1>
            <p>这里是订单的内容。</p>
        </div>
        <div id="settings" class="content-section">
            <h1>设置</h1>
            <p>这里是设置的内容。</p>
        </div>
    </div>
    <script>
        function showContent(sectionId) {
            const sections = document.querySelectorAll('.content-section');
            sections.forEach(section => {
                section.style.display = 'none';
            });
            document.getElementById(sectionId).style.display = 'block';
        }
    </script>
</body>
</html>
